// Layout
// --------------------------------------------------

body.header-fixed {
	header {
		position: fixed;
		width: 100%;
		margin-left: 0;
		.backface-visibility(hidden);
		.brand {
			display: block;
		}
	}
	.main-sidebar {
		top: 60px;
		&.fixed {
			padding-top: 0;
		}
		.brand {
			display: none;
		}
	}
	.brand {
		float: left;
	}
	.wrapper {
		padding-top: 80px;
	}
}

body.bs-static-navbar {
	.navbar {
		margin-left: 250px;
		.transition(margin .3s);
	}
	.navbar-brand {
		display: none;
	}
	.main-sidebar {
		&.collapsed {
			~ .navbar {
				margin-left: 0;
			}
		}
	}
}



// Brand
// -------------------------
.brand {
	background-color: darken(@primary, 10%);
	width: 250px;
	display: none;
}

// Sidebar
// -------------------------
.main-sidebar {
	width: 250px;
	height: auto;
	overflow: visible;
	position: absolute;
	background-color: @white;
	z-index: 990;
	opacity: 1;
	.translate(0, 0);
	.transition(all .3s);
	.box-shadow-helper(2);
	.backface-visibility(hidden) !important;
	&.fixed {
		position: fixed;
		top: 0;
		bottom: 0;
	}
	.brand {
		display: block;
	}
	&.collapsed {
		opacity: 0;
		.translate(-100%, 0);
		~ header {
			margin-left: 0;
		}
	}
	&.inverse {
		background-color: @light-black;
	}
	&.pinned {
		~ .content {
			margin-left: 250px;
			.transition(margin-left .3s);
		}
	}
}
// Navigation
// -------------------------

.navigation {
	.header {
		padding: 10px 0;
		text-transform: uppercase;
		color: @primary;
		margin: 0 20px;
		font-weight: 700;
		font-size: 12px;
	}
	> li {
		> a {
			display: block;
			padding: 10px 20px;
			color: @white;
			font-weight: 600;
			> i {
				margin-right: 5px;
				padding: 5px;
				width: 24px;
				text-align: center;
			}
			&[aria-expanded="true"],
			&:hover,
			&.active {
				color: @white;
				background-color: @lighter-black;
				> i {
				background-color: @primary;
				}
			}
		}
	}
	li.panel {
		background-color: transparent;
		box-shadow: none;
		margin-bottom: 0;
		border: none;
	}
	ul {
		padding-left: 20px;
		li a {
			padding: 10px 20px;
			color: darken(@white, 20%);
			white-space: nowrap;
			display: block;
			i {
				margin-right: 5px;
			}
			span {
				position: relative;
				&:before {
					content: "";
					position: absolute;
					width: 100%;
					height: 1px;
					bottom: -3px;
					left: 0;
					background-color: @darker-gray;
					display: inline;
					.scaleX(0);
					.transition(all .2s ease-in-out);
				}
			}
			&:hover span:before {
				.scaleX(1);
			}
			&[aria-expanded="true"], &.active {
				span:before {
					.scaleX(1);
				}
			}
		}
	}
	a[aria-expanded="false"]:after {
		font-family: "Material-Design-Iconic-Font";
		content: "\f278";
		float: right;
		text-align: center;
		width: 24px;
		line-height: 24px;
		.rotate(0deg);
		.transition(all .3s);	
	}
	a[aria-expanded="true"]:after {
		font-family: "Material-Design-Iconic-Font";
		content: "\f278";
		float: right;
		text-align: center;
		width: 24px;
		line-height: 24px;
		.rotate(225deg);
		.transition(all .3s);
	}
}

// Header
// -------------------------
header {
	background-color: @primary;
	height: 60px;
	z-index: 1000;
	margin-left: 250px;
	.box-shadow-helper(1);
	.transition(margin .3s);
}

.search-bar {
	width: 100%;
	position: absolute;
	top: 0;
	left: 0;
	height: 60px;
	background-color: @white;
	overflow: hidden;
	z-index: 1000;
	opacity: 1;
	.translate(0, 0);
	.transition(all .3s);
	&.collapsed {
		opacity: 0;
		.translate(0, -60px);
	}
	.form-group {
		margin: 7px;
		.form-control {
			background-color: transparent;
			border-color: transparent;
			&:focus {
				border-color: transparent;
			}
		}
		.btn-default {
			&:hover,
			&.focus,
			&:focus,
			&.active,
			&:active  {
				background-color: transparent !important;
				border-color: transparent !important;
			}
		}
	}
}

// Notification bar
// -------------------------

.notification-bar {
	list-style: none;
	margin: 0 15px;
	padding-left: 0;
	> li {
		float: left;
		height: 60px;
	}
}

// Right Content
// -------------------------

.content {
	margin-left: 0;
	.transition(margin-left .3s);
}


// Main Content
// -------------------------

.content > .container-fluid {
	padding-left: 20px;
	padding-right: 20px;
}
.wrapper {
	padding-top: 20px;
	padding-bottom: 20px;
}

// Extra Small Devices

@media (max-width: 767px) {
	body.header-fixed {
		.main-sidebar {
			margin-top: 0;
			~ .navbar .navbar-brand {
				display: none;
			}
		}
	}
	header {
		margin-left: 0;
		.brand {
			display: none !important;
		}
	}
	body.bs-static-navbar {
		.navbar {
			margin-left: 0;
		}
	}
	.main-sidebar {
		width: 100%;
		top: 0 !important;
		z-index: 1040;
		padding-bottom: 0 !important;
		.brand {
			display: block !important;
			float: none !important;
			width: 100%;
		}
	}
	.notification-bar {
		> li.dropdown.open {
			position: static;
			.dropdown-menu {
				width: 100%;
				top: 60px;
			}
		}
	}
	.content {
		width: 100%;
		> .container-fluid {
			padding-left: 15px;
			padding-right: 15px;
		}
	}
}